#数据分析与可视化
# 使用Pandas和Plotly分析数据
import pandas as pd
import plotly.express as px

df = pd.read_csv('sales_data.csv')
monthly_sales = df.groupby(pd.to_datetime(df['date']).dt.month)['amount'].sum()

fig = px.line(monthly_sales, title="Monthly Sales Trend")
fig.show()